package cn.snoworld.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@ApiModel(value = "评论", description = "文章评论")
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("comment")
public class Comment {
    @TableId(type = IdType.AUTO)
    @ApiModelProperty("评论ID")
    private Integer id;

    @ApiModelProperty("父ID")
    private Integer parentId = 0;

    @ApiModelProperty("用户ID")
    private Integer userId;

    @ApiModelProperty("评论内容")
    private String text;

    @ApiModelProperty("评论时间")
    @TableField(value = "gmt_create", fill = FieldFill.INSERT)
    private LocalDateTime creationTime;
}
